package com.dems.admin.controller;

import com.dems.domain.AreaVO;
import com.dems.domain.JsonResponse;
import com.dems.service.CfgAreaService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/area")
public class CfgAreaController {
    @Autowired
    private CfgAreaService areaService;

    @PostMapping("/list")
    public JsonResponse queryAreaTreeList(@RequestBody(required = false)AreaVO areaVO){
        return JsonResponse.success(areaService.queryAreaList(areaVO));
    }
}
